package com.atguigu.democustomer.service.impl;

import com.atguigu.democustomer.bean.Customer;
import com.atguigu.democustomer.mapper.CustomerMapper;
import com.atguigu.democustomer.service.CustomerService;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service

public class CustomerServiceImpl extends ServiceImpl<CustomerMapper,Customer> implements CustomerService {

    @Autowired
    private CustomerMapper customerMapper;
    @Override
    public String getCustomerById(String id) {
//        System.out.println("Customer:"+id);
        Customer customer = customerMapper.selectById(id);
        return customer.toString();
    }

    @Override
    public void saveCustomer(Customer customer) {
        System.out.println(customer);
    }
}
